package com.hamster.crmpre.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hamster.crmpre.mapper.CourseTaskMapper;
import com.hamster.crmpre.pojo.CourseTask;
import com.hamster.crmpre.service.ParticipationRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 参课任务 Service
 * @author Tarry
 * @create 2019/12/28 16:36
 */
@Service
public class ParticipationRateServiceImpl implements ParticipationRateService {
    @Autowired
    private CourseTaskMapper courseTaskMapper;
    /**
     * 查询参课任务列表
     * @return
     */
    @Override
    public List<CourseTask> listCourseTasks() {
        QueryWrapper<CourseTask> courseTaskQueryWrapper = new QueryWrapper<>();
        courseTaskQueryWrapper.eq("del","0").eq("state","1").orderByDesc("start_time");
        List<CourseTask> list = courseTaskMapper.selectList(courseTaskQueryWrapper);
        return list;
    }
}
